Skip to content

Make Animated modules Flow strict-local (#57738) - #57738

Open
rubennorte wants to merge 8 commits into
react:mainfrom
rubennorte:export-D113763780
Open

Make Animated modules Flow strict-local (#57738)#57738
rubennorte wants to merge 8 commits into
react:mainfrom
rubennorte:export-D113763780

Conversation

@rubennorte

@rubennorte rubennorte commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary:

Upgrade the Animated implementation and node modules from flow to flow strict-local to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain createAnimatedComponent to component-only React.ElementType values so component props remain inferred without any, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 28, 2026
@meta-codesync

meta-codesync Bot commented Jul 28, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113763780.

@github-actions

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 28, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D113763780
@meta-codesync meta-codesync Bot changed the title Make Animated modules Flow strict-local Make Animated modules Flow strict-local (#57738) Jul 28, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 3, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 3, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 3, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 3, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
@rubennorte
rubennorte force-pushed the export-D113763780 branch 2 times, most recently from 563a89c to 6a3805d Compare September 8, 2026 12:27
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 8, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
…t#57726)

Summary:
Pull Request resolved: react#57726

Upgrade the FlatList/SectionList list components, the networking modules (`XMLHttpRequest`, `FormData`, `RCTNetworking`, `convertRequestBody`), and the UIManager modules from `flow` to `flow strict-local`. Public type signatures are preserved exactly, so no consumers need updating; internal `any` and `Object` usages were replaced with accurate types wherever that did not change a public signature.

Two public signatures deliberately keep their original loose types behind a scoped `$FlowFixMe[unclear-type]`, because Flow's invariance rules mean any precise annotation would reject existing callers: the `headers` parameters on the `XHRInterceptor` interface (invariant indexers), and `commandArgs` on `UIManager.dispatchViewManagerCommand` (invariant array elements, which would reject callers passing an already-typed array).

Changelog: [Internal]

Reviewed By: cipolleschi, javache

Differential Revision: D113763786
…57730)

Summary:
Pull Request resolved: react#57730

Upgrade the remaining ReactNative and Core modules from `flow` to `flow strict-local`, preserving public type signatures so consumers are unaffected. Genuinely-dynamic internal `any` usages are marked with scoped `$FlowFixMe[unclear-type]` where an accurate type cannot be expressed.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763791
Summary:
Pull Request resolved: react#57739

Upgrade `deepDiffer`, `codegenNativeCommands`, `Dimensions`, and `ReactNativeTestTools` from `flow` to `flow strict-local`, preserving both public type signatures and runtime behavior. These modules operate on values of arbitrary shape, so the unavoidable `any` and `Function` usages are marked with scoped `$FlowFixMe[unclear-type]` rather than tightened.

`Dimensions.addEventListener` deliberately keeps its original `handler: Function` signature. Flow types object properties invariantly, so any precise payload annotation would reject existing subscribers that annotate the payload with their own object shapes, forcing unrelated call sites to change. The generated API snapshot is therefore unchanged for `Dimensions`.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763789
Summary:
Pull Request resolved: react#57736

Upgrade the Settings modules from `flow` to `flow strict-local`, preserving public type signatures so consumers are unaffected. Values read from the settings store are of arbitrary shape, so those internal `any` usages are marked with scoped `$FlowFixMe[unclear-type]`.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763793
Summary:
Pull Request resolved: react#57734

Upgrade `processTransform` from `flow` to `flow strict-local`, preserving its public type signature. Mechanical violations were fixed accurately; arbitrary-shape internal values are marked with scoped `$FlowFixMe[unclear-type]`.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763784
Summary:
Pull Request resolved: react#57737

Upgrade the remaining assorted modules (Touchable pooling, ActionSheetIOS, Alert, LogBox highlight, Text native component, PushNotificationIOS) from `flow` to `flow strict-local`, preserving public type signatures so consumers are unaffected. Genuinely-dynamic internal `any` usages are marked with scoped `$FlowFixMe[unclear-type]` where an accurate type cannot be expressed.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763783
Summary:
Pull Request resolved: react#57740

`getSizeWithHeaders` on the ImageLoader native modules typed its `headers` parameter as the opaque `UnsafeObject`. HTTP headers are a homogeneous string-to-string map, so type them as `{[key: string]: string}` instead. This is codegen-compatible and emits the same native type (`NSDictionary`/`ReadableMap`/`jsi::Object`), so there is no change to the native interface — it only adds value-type validation on the JavaScript side.

Other `UnsafeObject` usages in these specs (e.g. `queryCache`'s result) are left as-is because their accurate types either differ from the callers' expectations or are genuinely dynamic.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113781106
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 9, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 9, 2026
Summary:
Pull Request resolved: react#57738

Upgrade the Animated implementation and node modules from `flow` to `flow strict-local` to enforce stricter local type checking, replacing loose types with the accurate existing Animated type vocabulary. Constrain `createAnimatedComponent` to component-only `React.ElementType` values so component props remain inferred without `any`, and regenerate the public API snapshot. Runtime behavior is unchanged.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D113763780
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant